<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        var arr=[21,24,1,42,5,23];
        console.log(arr.push(34));
        console.log(arr);
        console.log("----------------------------------");
        console.log(arr.pop());
        console.log(arr);
        console.log("----------------------------------");
        console.log(arr.shift());
        console.log(arr);
        console.log("----------------------------------");
        console.log(arr.unshift(254,143,56));
        console.log(arr);
        console.log("----------------------------------");
        var arr2=arr.sort(function(a,b){
            return a-b;
        })
        console.log(arr2);
    </script>
</body>
</html>